Description
The Asset
property in the BaseResourceEditor<T>
class represents the asset being edited by this resource editor. It is a virtual property, allowing derived classes to override its behavior if necessary. This property is sealed, meaning it cannot be further overridden in subclasses of BaseResourceEditor<T>
.
Usage
Use the Asset
property to access or modify the asset associated with the resource editor. This property is typically used within custom editor implementations to interact with the asset being edited.
Example
public class MyResourceEditor : BaseResourceEditor<MyResourceType>
{
public override void SomeMethod()
{
// Access the asset being edited
var currentAsset = this.Asset;
// Perform operations on the asset
if (currentAsset != null)
{
// Example operation
currentAsset.DoSomething();
}
}
}